<template>
	<div>
		<Bread>
			<template v-slot:title>
				<el-breadcrumb-item v-for="(item, index) in titleList" :key="index">
					{{ item }}</el-breadcrumb-item
				>
			</template>
		</Bread>
		<Card  />
	</div>
</template>

<script>
import Bread from '../../components/Bread.vue'
import Card from '../../components/rights/Card.vue'
export default {
	name: 'Rights',
	data() {
		return {
			titleList: ['权限管理', '权限列表'],

		}
	},
	components: {
		Bread,
		Card,
	},
	methods: {
		getList() {
            this.test = '测试'
			this.$http
				.get('rights/list')
				.then(response => {
					let { data, meta } = response.data
             this.$bus.$emit('getRightsData',data,meta)
                    if(meta.status != 200){
                        this.$message.error('获取参数失败')
                    }
				})
				.catch(error => {
					console.log(error.message)
				})
		},
	},
	created() {
		this.getList()
	},

  
}
</script>
